package pers.cj.pdos.service;

import pers.cj.pdos.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;
import pers.cj.pdos.vo.InGoodsVo;
import pers.cj.pdos.vo.JoinSplitVo;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 拆卸后的价格要高于原价格
 服务类
 * </p>
 *
 * @author chenj
 * @since 2019-11-04
 */
public interface IJoinSplitService extends IService<JoinSplit> {

    boolean checkNo(String no, String companyId);
    boolean checkClose(JoinSplit joinSplit);

    void insert(JoinSplit joinSplit,
                List<JoinSplitOldGoods> oldGoodsList,
                List<GoodsSn> oldGoodsSnList,
                List<GoodsSnLog> oldGoodsSnLogList,
                List<JoinSplitNewGoods> newGoodsList,
                List<GoodsSn> newGoodsSnList,
                List<GoodsSnLog> newGoodsSnLogList);

    void close(JoinSplit joinSplit);

    List<JoinSplitVo> listVo(String companyId,
                             Integer page,
                             Integer limit,
                             Boolean close,
                             String search,
                             String no,
                             String goodsName,
                             String remark,
                             Date date1,
                             Date date2,
                             String oldStoreId,
                             String newStoreId,
                             String userStoreId,
                             String userId,
                             Date makeTime1,
                             Date makeTime2,
                             String oldHouseId,
                             String newHouseId,
                             String makeUserId);

    long count(String companyId,
               Boolean close,
               String search,
               String no,
               String goodsName,
               String remark,
               Date date1,
               Date date2,
               String oldStoreId,
               String newStoreId,
               String userStoreId,
               String userId,
               Date makeTime1,
               Date makeTime2,
               String oldHouseId,
               String newHouseId,
               String makeUserId);

    JoinSplitVo getVoById(String id);

    List<JoinSplitVo> listVoByIds(List<String> ids);

}
